import Vue from 'vue'
import Router from 'vue-router'
// import HelloWorld from '@/components/HelloWorld'
Vue.use(Router)


//路由懒加载（按需打包)
const HomeContainer = () => import('@/components/tabbar/Homecontainer.vue')
// import HomeContainer from '@/components/tabbar/Homecontainer.vue'

const MemberContainer = () => import('@/components/tabbar/MemberContainer.vue')
// import MemberContainer from '@/components/tabbar/MemberContainer.vue'

const ShopcarContainer = () => import('@/components/tabbar/ShopcarContainer.vue')
// import ShopcarContainer from '@/components/tabbar/ShopcarContainer.vue'

const SearchContainer = () => import('@/components/tabbar/SearchContainer.vue')
// import SearchContainer from '@/components/tabbar/SearchContainer.vue'

const NewsList = () => import('@/components/news/Newslist.vue')
// import NewsList from '@/components/news/Newslist.vue'

const NewsInfo = () => import('@/components/news/NewsInfo.vue')
// import NewsInfo from '@/components/news/NewsInfo.vue' 

const PhotoList = () => import('@/components/photos/PhotosList.vue')
// import PhotoList from '@/components/photos/PhotosList.vue'

const PhotoInfo = () => import('@/components/photos/PhotoInfo.vue')
// import PhotoInfo from '@/components/photos/PhotoInfo.vue'

const Goodslist = () => import('@/components/goods/Goodslist.vue')
// import Goodslist from '@/components/goods/Goodslist.vue'

const GoodsInfo = () => import('@/components/goods/Goodsinfo.vue')
// import GoodsInfo from '@/components/goods/Goodsinfo.vue'




export default new Router({
  routes: [
    {
      path: '/',
      redirect: "/home"
    },
    {
      path: '/home',
      name: 'HomeContainer',
      component: HomeContainer
    },
    {
      path: '/member',
      name: 'MemberContainer',
      component: MemberContainer
    },
    {
      path: '/shopcar',
      name: 'ShopcarContainer',
      component: ShopcarContainer
    },
    {
      path: '/search',
      name: 'SearchContainer',
      component: SearchContainer
    },
    {
      path: '/home/newlist',
      name: 'NewsList',
      component: NewsList
    },
    {
      // path:'/home/newslist/newInfo', query方法
      path:'/home/newslist/newInfo/:id', //params方法
      name: 'NewsInfo',
      component: NewsInfo
    },
    {
      path: '/home/photolist',
      name: 'PhotoList',
      component: PhotoList
    },
    {
      path: '/home/PhotoInfo',
      name: 'PhotoInfo',
      component: PhotoInfo
    },
    {
      path: '/home/goodlist',
      name: 'Goodslist',
      component: Goodslist
    },
    {
      path: '/home/goodsinfo',
      name: 'GoodsInfo',
      component: GoodsInfo
    },

  ],
  linkActiveClass:"mui-active"//覆盖默认的路由高亮类。。。

})
